<template>
  <BaseText v-if="text" is-icon :name="copyIcon" size="1.2em" @click="doCopy" />
</template>

<script setup>
import copyIcon from "@/assets/icon/copy.svg";
import { clipboard } from "@/utils/clipboardUtils.js";
const props = defineProps({
  text: String,
});
const doCopy = (e) => {
  clipboard(e, props.text);
};
</script>

<style lang="scss" scoped></style>
